﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;

namespace WebApplication
{
    public class Global : System.Web.HttpApplication
    {

        protected void Application_Start(object sender, EventArgs e)
        {

        }

        protected void Session_Start(object sender, EventArgs e)
        {

        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {

        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {
            Exception ex = Server.GetLastError();
            StringBuilder sb = new StringBuilder();
            string dt = DateTime.Now.ToString();
            sb.Append("").Append(dt).Append("\r\n内部错误：").Append(ex.InnerException.ToString())
                .Append("\r\n堆栈").Append(ex.StackTrace)
                .Append("\r\n内容").Append(ex.Message)
                .Append("\r\n来源").Append(ex.Source);
            //Log.setLog(sb.ToString());
            Server.ClearError();
            //Server.Transfer("error.aspx",false);

            Queue<object> queueStr = new Queue<object>();
            queueStr.Enqueue("zhangxl");
            queueStr.Dequeue();

            //WaitHandle wh = new WaitHandle();
        }

        protected void Session_End(object sender, EventArgs e)
        {

        }

        protected void Application_End(object sender, EventArgs e)
        {

        }
    }
}